<template>
	<div class="nav">
		<h2>会员专属福利</h2>
		<ul>
			<li v-for="(v,i) in this.$store.state.vipnav" :key="i">
				<img :src="v.imgbig" class="big" />
				<p>{{v.title}}</p>
				<img :src="v.imgsmall" class="small" />
				<span>{{v.type}}</span>
				<router-link to="/vip" :class="v.bool?'focus':''">{{v.con}}</router-link>
			</li>
		</ul>
	</div>
</template>

<script>
	export default {
		mounted() {
			this.$store.dispatch("vipnavaxios");
		}
	}
</script>

<style lang="scss" scoped="scoped">
	.nav {
		width: calc(100% - 0.26rem);
		padding: 0.25rem 0.13rem 0.25rem;
		border-top: 2px solid #eeeeee;
		border-bottom: 2px solid #eeeeee;
		float: left;
		h2 {
			font-size: 0.17rem;
			margin-top: -0.1rem;
		}

		ul {
			float: left;
			li {
				width: 1.7rem;
				height: 1.45rem;
				float: left;
				position: relative;
				margin-top: 0.15rem;
				margin-left: 0.08rem;
				.big {
					position: absolute;
					top: 0;
					left: 0;
				}

				p {
					font-size: 0.13rem;
					position: absolute;
					top: 1rem;
					left: 0;
				}

				.small {
					position: absolute;
					top: 1.28rem;
					left: 0;
				}

				span {
					font-size: 0.13rem;
					color: #999999;
					position: absolute;
					top: 1.25rem;
					left: 0.18rem;
				}

				a {
					display: block;
					width: 0.56rem;
					height: 0.2rem;
					border-radius: 0.15rem;
					position: absolute;
					top: 1.25rem;
					right: 0.14rem;
					color: #FFFFFF;
					background-color: #ddbb77;
					opacity: 0.5;
					text-align: center;
					line-height: 0.2rem;
					font-size: 0.12rem;
				}
				.focus{
					opacity: 1;
				}
			}

			li:nth-of-type(odd) {
				margin-left: 0;
			}
		}
	}
</style>
